package com.game.mongo;

import org.springframework.data.mongodb.core.mapping.DBRef;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by legend9999 on 2016/6/5.
 */
public class User {
	private int userId;
	private String nickName;
	private String loginName;
	private String password;
	private String IMEI;
	private long coin;
	private long maxCoin;
	private long yuanbao;
	private long maxYuanbao;
	private String photoUrl = "";
	private Date createTime;
	private Date lastLoginTime;

	public User(String loginName, String password) {
		this.nickName = loginName;
		this.loginName = loginName;
		this.password = password;
		this.createTime = new Date();
		this.lastLoginTime = createTime;
	}

	public User() {
	}
	private Map<Integer, GameData> gameDataMap = new HashMap<Integer, GameData>();

	@Override
	public String toString() {
		return "User [id=" + userId + ", name=" + nickName + ", password=" + password + "]";
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getIMEI() {
		return IMEI;
	}

	public void setIMEI(String IMEI) {
		this.IMEI = IMEI;
	}

	public long getCoin() {
		return coin;
	}

	public void setCoin(long coin) {
		this.coin = coin;
	}

	public long getMaxCoin() {
		return maxCoin;
	}

	public void setMaxCoin(long maxCoin) {
		this.maxCoin = maxCoin;
	}

	public long getYuanbao() {
		return yuanbao;
	}

	public void setYuanbao(long yuanbao) {
		this.yuanbao = yuanbao;
	}

	public long getMaxYuanbao() {
		return maxYuanbao;
	}

	public void setMaxYuanbao(long maxYuanbao) {
		this.maxYuanbao = maxYuanbao;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public Map<Integer, GameData> getGameDataMap() {
		return gameDataMap;
	}

	public void setGameDataMap(Map<Integer, GameData> gameDataMap) {
		this.gameDataMap = gameDataMap;
	}

	public String getPhotoUrl() {
		return photoUrl;
	}

	public void setPhotoUrl(String photoUrl) {
		this.photoUrl = photoUrl;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
}
